package experiment.e05.code.ch04.v0;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/13 16:04
 * @package experiment.e05.code.ch04.v0
 * @description 文件说明
 */

public class Test0 {
    public static void main(String[] args) {
        // 测试圆类
        System.out.println("========== 测试 circle ==========");
        Circle circle = new Circle(4);
        circle.setX(32);
        circle.setY(3);
        System.out.println("圆形面积：" + circle.getArea());

        // 测试矩形
        System.out.println("\n========== 测试 rectangle ==========");
        Rectangle rectangle = new Rectangle(3, 2);
        rectangle.setX(3);
        rectangle.setY(7);
        System.out.println("矩形面积：" + rectangle.getArea());

        // 测试 Point 中定义的方法
        System.out.println("\n========== 测试 Point 方法 ==========");
        Point circlePoint = circle;
        System.out.println(circlePoint.toString());

        Point rectanglePoint = rectangle;
        System.out.println(rectanglePoint.toString());

    }
}
